package org.example.cicdi.service.impl.org;
//
//import org.jeecg.modules.cicdi.enums.EnumWhiteTableAnnotation;
//import org.jeecg.modules.codegenerate.modelext.WebVo.annotation.table.WVo;
//import org.jeecg.modules.codegenerate.modelext.WebVo.domian.table.WebModelVo;
import org.example.cicdi.enums.EnumWhiteTableAnnotation;
import org.example.codegenerate.modelext.WebVo.annotation.table.WVo;
import org.example.codegenerate.modelext.WebVo.domian.table.WebModelVo;
import org.springframework.stereotype.Service;

import java.lang.annotation.Annotation;

@Service
public class WVoAannotationServiceImpl implements TableAnnotationService {
	
	@Override
	public String getCode() {
		return EnumWhiteTableAnnotation.WebModel.getCode();
	}
	
	public  Annotation getAnnotation() {
		return null;
	}
	
	@Override
	public WebModelVo handleTableVo(Class<?>cl, WebModelVo model) {
		WVo vo = cl.getAnnotation(WVo.class);
		if (vo == null) {
			return model;
		}
		
		if (model == null) {
			model = new WebModelVo();
		}
		
		//model.setPackageName(vo.packageName());
		model.setDestinationOutPutDir(vo.destinationOutPutDir());
		model.setFrontDestionOutPutDir(vo.frontDestionOutPutDir());
		model.setJformType(vo.jformType());
		model.setModeltype(vo.modeltype());
		model.setServicename(vo.servicename());
		
		return model;
	}
}
